<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<!--数据类型-->
<script>
    // number
    var age = 20;
    var price = 199.98;
    alert(typeof age);
    alert(typeof price);

    // string
    var ch = 'a';
    var name = 'zhangsan';
    var addr = "beijing";
    alert(typeof ch);
    alert(typeof name);
    alert(typeof addr);

    // boolean
    var flag = false;
    var result = true;
    alert(typeof flag);
    alert(typeof result);

    // null
    var obj = null;
    alert(typeof obj);

    // undefined
    var a;
    alert(typeof a);
</script>
</body>
</html>